<!--
*Author：COCO
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/production/production/Production_OrderRequest.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/production/production/Production_OrderRequest.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'OrderId',
                footer: "Foots",
                cnName: '供应商交期',
                name: 'production/Production_OrderRequest',
                url: "/Production_OrderRequest/",
                sortName: "FDate"
            });
            const editFormFields = ref({});
            const editFormOptions = ref([]);
            const searchFormFields = ref({"OrgCode":"","FSupNumber":"","FSupName":"","FNumber":"","FName":"","FDate":""});
            const searchFormOptions = ref([[{"dataKey":"Org","data":[],"title":"组织","field":"OrgCode","type":"select"},{"title":"日期","field":"FDate","type":"month"}],[{"title":"供应商编号","field":"FSupNumber","type":"like"},{"title":"供应商名称","field":"FSupName","type":"like"}],[{"title":"物料编号","field":"FNumber","type":"like"},{"title":"物料名称","field":"FName","type":"like"}]]);
            const columns = ref([{field:'OrgCode',title:'组织',type:'string',bind:{ key:'Org',data:[]},width:100,require:true,align:'left',sort:true},
                       {field:'FSupNumber',title:'供应商编号',type:'string',width:100,require:true,align:'left'},
                       {field:'FSupName',title:'供应商名称',type:'string',width:220,align:'left'},
                       {field:'FNumber',title:'物料编号',type:'string',width:200,require:true,align:'left'},
                       {field:'FName',title:'物料名称',type:'string',width:150,align:'left'},
                       {field:'FDate',title:'日期',type:'datetime',width:120,require:true,align:'left',sort:true},
                       {field:'FQty',title:'数量',type:'decimal',width:110,require:true,align:'left'},
                       {field:'CreateDate',title:'创建日期',type:'datetime',width:150,require:true,align:'left',sort:true},
                       {field:'Creator',title:'创建人',type:'string',width:130,require:true,align:'left'},
                       {field:'OrderId',title:'ID',type:'long',width:80,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'FBillNo',title:'编号',type:'string',width:180,hidden:true,align:'left'},
                       {field:'FItemID',title:'物料内码',type:'long',width:80,hidden:true,require:true,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
